/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ies.domain.model.web;

import com.ies.domain.model.Pais;
import com.ies.domain.model.repository.facades.PaisFacade;
import com.ies.domain.model.util.JpaPool;
import com.ies.domain.model.web.util.AbstractCrudManagedBean;
import java.util.List;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;

/**
 *
 * @author jackson
 */
@ManagedBean(name = "PaisCrudMB")
@ViewScoped
public class PaisCrudMB extends AbstractCrudManagedBean<Pais> {

    private List<Pais> paises;

    public List<Pais> getPaises() {
        paises = JpaPool.getInstancia().getFacade(Pais.class).findAll();
        return paises;
    }

    public void setPaises(List<Pais> paises) {
        this.paises = paises;
    }

    @Override
    public void init() {
        entity = new Pais();
    }

    @Override
    public String save() {
        return super.save();
    }
}
